package com.elecbook.base.exception;

public class BaseInfoException extends RuntimeException {
    private String errMessage;

    public BaseInfoException() {
        super();
    }

    public BaseInfoException(String errMessage) {
        super(errMessage);
        this.errMessage = errMessage;
    }

    public String getErrMessage() {
        return this.errMessage;
    }

    public static void cast(CommonError commonError) {
        throw new BaseInfoException(commonError.getErrMessage());
    }

    public static void cast(String errMessage) {
        throw new BaseInfoException(errMessage);
    }
}
